# Maintainer: David Runge <dvzrv@archlinux.org>

_name=pprofile
pkgname=python-pprofile
pkgver=2.1.0
pkgrel=3
pkgdesc="Line-granularity, thread-aware deterministic and statistic pure-python profiler"
arch=('any')
url="https://github.com/vpelletier/pprofile"
license=('GPL2')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha512sums=('1cfea7bc89258f8a94c4c08cdbe84089e7417c17fe662014df33e315c86432830a100c367076ddb00b153e6a7b0d7394670190538fcbe85077c16bfe3dbb8545')
b2sums=('c5d94585f8a56e199cfe6ac73ad0528ca6de6bc252996989f07d29d9fea6bfeda4809f8806c00a710396b0a27518a0a02908e887b473e306612754dcb0ae8ccf')

prepare() {
  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
}

build() {
  cd "$pkgname-$pkgver"
  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"
  python setup.py install --optimize=1 --root="${pkgdir}"
  install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}
